package com.wk1un2.service.impl;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.wk1un2.dao.SignDao;
import com.wk1un2.entity.Sign;
import com.wk1un2.service.SignService;

@Service
public class SignServiceImpl extends ServiceImpl<SignDao, Sign> implements SignService {
	@Autowired
	private SignDao signdao;
//查询所有
	@Override
	public List<Map<String, Object>> getAll(Map<String, Object> map) {
		// TODO Auto-generated method stub
		return signdao.getAll(map);
	}
//查询总数
	@Override
	public Integer count(Map<String, Object> map) {
		// TODO Auto-generated method stub
		return signdao.count(map);
	}
//添加
	@Override
	public Integer insert(Sign sign) {
		// TODO Auto-generated method stub
		return signdao.insert(sign);
	}
//修改
	@Override
	public Integer update(Sign sign) {
		// TODO Auto-generated method stub
		return signdao.updateById(sign);
	}
//删除
	@Override
	public Integer delete(Integer signid) {
		// TODO Auto-generated method stub
		return signdao.deleteById(signid);
	}
//查询进行签到的咨询师
	@Override
	public List<Sign> getSignConsultant(Integer page, Integer limit,Integer signstate,String username) {
		// TODO Auto-generated method stub
		
		return this.baseMapper.getSignConsultant((page-1)*limit, limit, signstate, username);
	}
//签退主页面
	@Override
	public Integer updateByUseridMain(Map<String, Object> map) {
		// TODO Auto-generated method stub
		return signdao.updateByUseridMain(map);
	}
//签到主页面
	@Override
	public Integer addSignMain(Map<String, Object> map) {
		// TODO Auto-generated method stub
		return signdao.addSignMain(map);
	}
//查询签到状态主页面
	@Override
	public List<Sign> getSignStateMain(Integer userid) {
		// TODO Auto-generated method stub
		return signdao.getSignStateMain(userid);
	}

	
}
